﻿using Microsoft.Xna.Framework.Graphics;
using XNA_Game_Engine;
using XNA_Game_Engine.Characters;

namespace MenesDroid
{
    class NPCharacter : Character
    {
        private AnimatedSprite Sprite;

        public NPCharacter( int x, int y, AnimatedSprite sprite )
        {
		    this.x = x;
			this.y = y;
            this.Sprite = sprite;			
            //this.width = sprite.Width;
			//this.height = sprite.Height;			
            this.Speed = 200;
			this.Width = this.Height = 20;
        }

        public override void Update(float gameTime)
        {
            OldX = x; OldY = y;
            Sprite.Update(gameTime);

            x += (int)( Speed * gameTime / 1000 );
            y += (int)( Speed * gameTime / 1000 );
        }

        public override void Render(SpriteBatch renderTarget)
        {
            Sprite.Render(renderTarget,x,y);
        }


    }
}
